package hoowin.app.wsnd.action;

import java.util.List;

import hoowin.app.wsnd.model.Status;
import hoowin.app.wsnd.service.StatusService;
import hoowin.basic.model.User;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class Home extends ActionSupport {
	private User user;
	private List<Status> statusList;
	private StatusService statusService;

	public String execute(){
		this.statusList = statusService.getMyStatusList(user.getId());
		if(this.statusList==null)return SUCCESS;
		this.statusList.addAll(statusService.getStatusOfFollowees(user.getId()));
		return SUCCESS;
	}
	public void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return user;
	}

	public void setStatusList(List<Status> statusList) {
		this.statusList = statusList;
	}

	public List<Status> getStatusList() {
		return statusList;
	}
	public void setStatusService(StatusService statusService) {
		this.statusService = statusService;
	}
	public StatusService getStatusService() {
		return statusService;
	}
}
